﻿<UserControl x:Class="Main.Views.AppInfoView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewModels="clr-namespace:Main.ViewModels"
             xmlns:modularity="clr-namespace:Infrastructure.Modularity;assembly=Infrastructure.Client"
             mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400"
    d:DataContext="{d:DesignInstance d:Type=viewModels:AppInfoViewModel}">
    <Grid Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <ListBox ItemsSource="{Binding LoadedAssemblies}">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding}" Margin="2"/>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <ItemsControl Grid.Row="1" ItemsSource="{Binding Modules}">
            <ItemsControl.ItemTemplate>
                <DataTemplate DataType="modularity:ModuleTrackingState">
                    <Border BorderBrush="Black" BorderThickness="1" Margin="2">
                        <TextBlock Text="{Binding ModuleName}" Margin="5"/>
                    </Border>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </Grid>
</UserControl>
